import request from '@/utils/request'
import de from "element-ui/src/locale/lang/de";


//查询商品列表
export function getGoodsList(query) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/getGoodsList',
    method: 'get',
    params: query
  })
}

//商品添加并提审
export function addGood(data) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/addGood',
    method: 'post',
    data: data
  })
}


//更新商品
export function updateGood(data) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/updateGood',
    method: 'post',
    data: data
  })
}


//撤回商品审核
export function resetauditAudit(data) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/resetauditAudit',
    method: 'post',
    data: data
  })
}


//重新提交商品审核
export function submitAudit(goodsId) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/submitAudit/'+goodsId,
    method: 'post'
  })
}

//删除商品
export function deleteGood(goodsId) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/deleteGood/'+goodsId,
    method: 'post'
  })
}

//根据图片地址上传至微信临时素材
export function updateWaChatImg(url) {
  return request({
    url: '/prod-api/wechat/broadcast/goods/updateWaChatImg?url='+ url,
    method: 'get',
  })
}
